#include "stdafx.h"

#include "DesktopFrame.h"
#include "ControlFrame.h"

int APIENTRY WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, 
					 __in_opt LPSTR lpCmdLine, __in int nShowCmd )
{
	CPaintManagerUI::SetInstance(hInstance);
	CPaintManagerUI::SetResourcePath(CPaintManagerUI::GetInstancePath());

	::CoInitialize(NULL);
	::OleInitialize(NULL);

	// 	DesktopFrame* pDesktopFrame = new DesktopFrame();
	// 	if (pDesktopFrame == NULL) return 0;
	// 
	// 	pDesktopFrame->Create(NULL, _T("LKIM"), UI_WNDSTYLE_FRAME, WS_EX_STATICEDGE | WS_EX_APPWINDOW, 0, 0, 600, 800);
	// 	pDesktopFrame->CenterWindow();
	// 	::ShowWindow(*pDesktopFrame, SW_SHOW);

	ControlFrame* pDesktopFrame = new ControlFrame();
	if (pDesktopFrame == NULL) return 0;

	pDesktopFrame->Create(NULL, _T("LKIM"), UI_WNDSTYLE_FRAME, WS_EX_STATICEDGE | WS_EX_TOOLWINDOW, 300, 0, 200, 30);
	pDesktopFrame->CenterWindow();
	::ShowWindow(*pDesktopFrame, SW_SHOW);

	CPaintManagerUI::MessageLoop();
	CPaintManagerUI::Term();


	::OleUninitialize();
	::CoUninitialize();

	return 0;
}